#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

#define exchange(a) ((((a) & (0x55555555)) << 1) | (((a) & (0xaaaaaaaa)) >> 1))

int main()
{
	printf("%d\n", exchange(1));
	printf("%d\n", exchange(2));
	printf("%d\n", exchange(3));
	printf("%d\n", exchange(4));
	printf("%d\n", exchange(5));
	printf("%d\n", exchange(6));
	printf("%d\n", exchange(7));
	printf("%d\n", exchange(8));
}